#!/usr/bin/env python
# coding=utf-8

import pyExcelerator as pE
import codecs

excel_filename = r'09Light_UC_tts_PhraseList081210.xls'
outfile = codecs.open('specials.log', 'w', 'utf-8')

ss = u'~!@#$%^&*()_+`=[]\\;/{}|:"<>?｀－＝【】、；‘，。／～！＠＃￥％……＆×（）——＋｛｝｜“：？》《'
ss = unicode(ss)
specialSymbols = list(ss)
specialSymbols.append(u'..')

def main():
	xlsdata = pE.parse_xls(excel_filename)
	sheetdata = xlsdata[0][1]
	for col in range(100):
		for row in range(1000):
			if sheetdata.has_key((row, col)):
				dat = unicode(sheetdata[(row, col)])
				spTag = False
				for s in specialSymbols:
					if dat.find(s) >= 0:
						spTag = True
				if spTag:
					colName = chr(ord('A') + col)
					print >> outfile, '(', row+1, ',', colName, ')', dat

if __name__ == '__main__':
	main()




